﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;

namespace Douban.Api.Tests.Support
{
    public class ResourceLoader
    {
        public static Stream GetResource(string name)
        {
            Stream stream = Assembly.GetExecutingAssembly()
                .GetManifestResourceStream("Douban.Api.Tests.Data." + name);

            if (stream == null)
                throw new FileNotFoundException(name);

            return stream;
        }
    }
}
